package org.xiaofeipapa.scdemo.orderApi.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 */
@RestController
public class OrderApiController {

    @Value("${server.port}")
    private String serverPort;

    @RequestMapping(value="/hello", method = RequestMethod.GET)
    private String hello(){
        return "我是 order service, 端口为： " + serverPort;
    }

    @RequestMapping(value="/internal_hello", method = RequestMethod.GET)
    private String internalHello(){
        return "我是 order service, 提供给其他微服务的方法, 端口为： " + serverPort;
    }

}
